import { FMVCS } from "../../fgui/fmvc/FMVCS";
import Manager from "../../manager/Manager";
import { ConstDefine } from "../common/ConstDefine";
import GamePauseView from "./GamePauseView";
import { GlobalEvent } from "../global/Global";

export default class GamePauseCtrl extends FMVCS.FCtrl {
    /** 事件监听注册 */
    rigisterEventListener(){
        this.on(GlobalEvent.UIListenID.UI_BtnSetting_Click, this.openView, this);
        this.on(GlobalEvent.UIListenID.UI_BtnGoOn_Click, this.closeView, this);
        this.on(GlobalEvent.UIListenID.UI_BtnRestart_Click, this.closeView, this);
    }

    openView(){
        Manager.fui.open(ConstDefine.UI.GamePauseView, GamePauseView);
    }

    closeView(){
        Manager.fui.close(ConstDefine.UI.GamePauseView);
    }
}
